﻿@model EventModel
@{
    ViewBag.Title = Model.Title;
    var user = ViewBag.User as User;
}
@section Direct{

    @if (user.IsAdministrator())
    {
        <div class="adr">
            <ul>
                <li>@Html.ActionLink("返回", "Index", "Event")
                </li>
                <li>@Html.ActionLink("编辑", "Edit", new { id = Model.Id })
                </li>
                <li>@Html.ActionLink("封面", "UploadCover", new { id = Model.Id })
                </li>
                <li>@Html.ActionLink("照片和回顾", "EditRetrospect", new { id = Model.Id })
                </li>
                <li>@Html.ActionLink("报名", "Slate", new { id = Model.Id })
                </li>
                @if (Model.IsClosed)
                {
                    <li>@Html.ActionLink("激活", "Activate", new { id = Model.Id })
                    </li>
                }
                else
                {
                    <li>@Html.ActionLink("关闭", "Close", new { id = Model.Id })
                    </li>
                }
                @if (Model.IsHidden)
                {
                    <li>@Html.ActionLink("显示", "Show", new { id = Model.Id })
                    </li>
                }
                else
                {
                    <li>@Html.ActionLink("隐藏", "Hide", new { id = Model.Id })
                    </li>
                }
                <li><a onclick="javascript:return confirm('确认删除吗?');" aria-disabled="true" href="/Event/Delete/@(Model.Id)">删除</a></li>
            </ul>
        </div>
    }
}
<section class="ec-de">
    <div class="ec-de-0">
        <div>
            <img alt="@Model.Title" src="/Assets/Event/@(Model.Id)/@(Model.Cover).jpg" />
        </div>
        <header>
            <h2>@Model.Title</h2>
            <div>
                <time>@Model.ActAt</time>
                <address>@Model.Locale</address>
            </div>
        </header>
    </div>
    <div class="ec-de-1">
        <div class="t t-1 live-tile">
            <strong>@Model.ActAt</strong>
            <span class="tile-title">活动时间</span>
        </div>
        <div class="t t-2 live-tile">
            <strong>@Model.Locale</strong>
            <span class="tile-title">活动地点</span>
        </div>
        <div class="t t-3 live-tile">
            <strong>@Model.Audience</strong>
            <span class="tile-title">活动人群</span>
        </div>
    </div>
    <div class="ec-de-2">
        <h6>活动内容</h6>
        <pre>@Model.Description</pre>
    </div>
    <div class="ec-de-3 form">
        @using (Html.BeginForm())
        {
            @Html.HiddenFor(r => r.Id)
            if (!Model.Signed)
            {
            <input class="symbol" type="submit" value="我要参加" />
            }
            else
            {
            <input class="symbol" type="submit" disabled="disabled" value="已报名" />
            }
        }
    </div>
</section>
<section class="discovery">
    <div class="ec-de-4">
        <h3>往期活动</h3>
        <div class="grid-container">
            <div class="grid-row row-3">
                <div class="grid-unit col-1">
                    <a href="/">
                        <div>
                            <img alt="" src="~/Content/images/1440x400.jpg" />
                        </div>
                    </a>
                </div>
                <div class="grid-unit col-1">
                    <a href="/">
                        <div>
                            <img alt="" src="~/Content/images/1440x400.jpg" />
                        </div>
                    </a>
                </div>
                <div class="grid-unit col-1">
                    <a href="/">
                        <div>
                            <img alt="" src="~/Content/images/1440x400.jpg" />
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
</section>
